home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -serious- / cd-rom / showtoc / showtoc.readme < prev    next >
Text File  |  2000-02-28  |  12KB  |  349 lines

  1. Short:    Shows TOC of AudioCDs in various ways
  2. Kurz:     zeigt TOC von AudioCDs in vielen Varianten
  3. Author:   amiga@rripley.de (Ralph Reuchlein)
  4. Uploader: amiga@rripley.de (Ralph Reuchlein)
  5. Type:     disk/cdrom
  6. Version:  1.1
  7. Date:     20-Feb-2000
  8. Replaces: disk/cdrom/ShowTOC.lha
  9.  
  10.  
  11.                                ShowTOC
  12.                                =======
  13.  
  14.  
  15. PURPOSE
  16.  
  17.    Since I own a CD burner I made my own compilations from various CDs
  18.    including AudioCDs containing my favourite Amiga modules.  I also
  19.    create my own CD labels I print and stick on my burnt CDs.  Now I
  20.    had the problem to find out the length of each burnt track and the
  21.    information provided by the source CDs is wrong in most cases, so I
  22.    decided to write a program that prints the contents of an AudioCD
  23.    in a configurable way.
  24.  
  25.    This software is eMailware, which means, that if you like this
  26.    piece of software, you have to write me an eMail (address see end
  27.    of readme).
  28.  
  29.  
  30. HISTORY
  31.  
  32.  
  33.    v1.1 (20-Feb-2000):
  34.    - format types %b,%y,%c,%C,%p,%P added, descriptions and example
  35.      see below
  36.    - added additional info to option CDIDDIR to the readme since many
  37.      people were confused about it
  38.  
  39.    v1.0 (09-Jan-2000):
  40.    - public release
  41.  
  42.  
  43.  
  44. INSTALL
  45.  
  46.    Simply unpack the archive to anywhere you want.  I prefer to copy
  47.    the executable to C:.
  48.  
  49.  
  50.  
  51. REQUIREMENTS
  52.  
  53.    - OS 3.0 and higher
  54.    - a SCSI interface
  55.    - CDROM
  56.    - AudioCDs :-)
  57.  
  58.  
  59.  
  60. USAGE
  61.  
  62.    The template is
  63.  
  64.       DEVICE=D/K/A,UNIT=U/N/K/A,FORMAT=FMT/K,INTRODUCER=INTR/K,CDIDDIR/K,
  65.       HEADFORMAT=HEADFMT/K,TAILFORMAT=TAILFMT/K,
  66.       NOHEADER/S,NOLIST/S,NOTAIL/S
  67.  
  68.    You always have to provide the device name of your SCSI interface
  69.    and the unit number of the device, which is usually
  70.  
  71.       unit = (BOARD * 100) + (LUN * 10) + SCSI_ID
  72.  
  73.    If you have only one SCSI interface, only the SCSI_ID is needed.
  74.  
  75.    FORMAT is the format string for each track on CD, HEADFORMAT is
  76.    used for a header of the track list (e.g. CD ID) and TAILFORMAT for
  77.    the end of the track list (e.g. length of CD).  Each of the format
  78.    parameters have default parameter:
  79.  
  80.       HEADFORMAT: "       CD: %i%\n    Title: %T%\nArtist(s): %a"
  81.       FORMAT:     "Track  %2n: %d  %t"
  82.       TAILFORMAT: "CD length: %f"
  83.  
  84.    Available format types are:
  85.  
  86.       %sm   Minutes of start time
  87.       %ss   Seconds of start time
  88.       %sf   frame fraction of start time
  89.       %sd   decimal fraction of start time
  90.       %sa   all frames of start time
  91.       %s    start time with format "%2sm:%02ss;%02sf"
  92.       %sn   number of first track
  93.  
  94.       %em   Minutes of end time
  95.       %es   Seconds of end time
  96.       %ef   frame fraction of end time
  97.       %ed   decimal fraction of end time
  98.       %ea   all frames of end time
  99.       %e    end time with format "%2em:%02es;%02ef"
  100.       %en   number of last track
  101.  
  102.       %dm   Minutes of duration
  103.       %ds   Seconds of duration
  104.       %df   frame fraction of duration
  105.       %dd   decimal fraction of duration
  106.       %da   all frames of duration
  107.       %d    duration with format "%2dm:%02ds;%02df"
  108.  
  109.       %fm   Minutes of full CD time
  110.       %fs   Seconds of full CD time
  111.       %ff   frame fraction of full CD time
  112.       %fd   decimal fraction of full CD time
  113.       %fa   all frames of full CD time
  114.       %f    full CD time with format "%2fm:%02fs;%02ff"
  115.  
  116.       %n    track number
  117.       %N    number of tracks
  118.       %b    track length in bytes
  119.       %y    type of track: AUDIO or DATA
  120.       %c    number of channels in track as numeric value
  121.       %C    number of channels in track as text
  122.       %p    Is digital copy of track "permitted" or "prohibited"?
  123.       %P    same as %p, but returns "y" or "n"
  124.  
  125.       %i    CD id
  126.       %T    Title of CD
  127.       %t    Title of track
  128.       %a    Artist(s) of CD
  129.       %l    TOC length on CD in bytes
  130.  
  131.       %\n   Special character: New line
  132.       %\r   Special character: Carriage return
  133.       %\f   Special character: Form feed
  134.       %\t   Special character: Tabulator
  135.  
  136.    As you can see, you have many opportunities to build your own
  137.    format strings.  Usage of format types for tracks in the header or
  138.    tail strings is senseless, but possible (you will get unpredictable
  139.    results).  By the way I have to describe the difference between the
  140.    'frame fraction' and 'decimal fraction':  Each second on an AudioCD
  141.    has 75 frames, therefore I have two ways to show these fraction.
  142.    First I can print out the number of frame in that second (the %xf
  143.    format type, which is default) or I can calculate the decimal
  144.    fraction (1/75th part) of one second (the %xd format type).  For
  145.    example a frame count of 47 (format type %xf) would print a 63
  146.    (rounded up) with the format type %xd, where x is one of s, e, d
  147.    and f.
  148.  
  149.    Each format type can be formatted like the printf() function from
  150.    the C standard libraries. There is only one restriction: You cannot
  151.    add a type qualifier to the type, e.g. "%lw" (must only be "%w").
  152.    Some examples of formatting:
  153.  
  154.       %30t  Track title will be displayed in a 30 column wide space.
  155.             If the basename length is less than 30, it will be right
  156.             filled by spaces.
  157.       %-30t Equals %30n, but field will be left filled by spaces.
  158.       %.4t  Truncates track name to 4 characters or will be right
  159.             filled if name length is less than 4.
  160.       %04fm Writes minutes of complete CD in a 4 column wide field.
  161.             If the number has less than 4 digits, it will be left
  162.             filled with zeros instead of spaces.
  163.  
  164.    For more information refer to the C standard library documentation
  165.    of printf(), sprintf() or fprintf().
  166.  
  167.    If you use ShowTOC in a script that also uses '%' as format
  168.    introducer, you can switch to another introducer with the parameter
  169.    INTRODUCER, e.g. to '$' or '&'.  I recommend non-alpha characters.
  170.  
  171.    Now some background for the option CDIDDIR:
  172.    Most CD player software on Amiga, e.g. OptyCDPlayer, ACDPlay, etc.,
  173.    use a standardized format to store title information of an AudioCD.
  174.    Each CD (even a pure data CD) has a TOC, otherwise it is
  175.    unreadable.  That TOC only stores the track length and some
  176.    internal data.  To store the title names of a CD, the CD player
  177.    software writes it to CDID files which are stored in a single
  178.    directory in your filesystem.  Each time the CD player software
  179.    recognizes a new inserted CD, it builds a unique CDID-Name and
  180.    tries to read the file using that name.  If the software finds a
  181.    file with the name, it reads in the file contents and uses it for
  182.    displaying the track names, artist name and cd name.  If you do not
  183.    use that track names at all, you never will get the track names for
  184.    ShowTOC.
  185.  
  186.    If you now want to use these stored track names with ShowTOC, you
  187.    have to specify the directory of these CDID files with the option
  188.    CDIDDIR.  If ShowTOC also recognizes the CD by its ID, it uses the
  189.    CDID-Data in the same way like the CD player software.  Thats all.
  190.    There is no need to build up a separate TOC on CD or something
  191.    else.  A TOC is always written if a usual CD will be burnt.
  192.  
  193.    Finally you can turn off the three output blocks header, list
  194.    and/or tail with the NOHEADER, NOLIST and NOTAIL switches.
  195.  
  196.    ShowTOC makes no difference between real audio tracks and data
  197.    tracks, therefore you can print a track listing of e.g. an
  198.    Aminet CD. To separate the types use the format type %y.
  199.  
  200.  
  201.  
  202. EXAMPLES
  203.  
  204.    A call of ShowTOC with the device and unit only
  205.  
  206.       ShowTOC DEVICE=2060scsi.device UNIT=2
  207.  
  208.    will return a simple track list:
  209.  
  210.              CD: ID11009B58037CA6
  211.           Title: 
  212.       Artist(s): 
  213.       Track   1:  4:18;15
  214.       Track   2:  4:31;40
  215.       Track   3:  4:11;45
  216.       Track   4:  4:11;15
  217.       Track   5:  4:30;55
  218.       Track   6:  4:56;10
  219.       Track   7:  4:27;45
  220.       Track   8:  4:02;10
  221.       Track   9:  4:40;02
  222.       Track  10:  5:35;68
  223.       Track  11:  5:21;25
  224.       CD length: 50:46;68
  225.  
  226.    The lines "Title:" and "Artist(s):" are empty, because ShowTOC
  227.    couldn't resolve the CD's name despite of the lack of parameter
  228.    CDIDDIR.  Using the same command including that parameter
  229.  
  230.       ShowTOC DEVICE=2060scsi.device UNIT=2 CDIDDIR=AUDIO:disks
  231.  
  232.    does print out
  233.  
  234.              CD: ID11009B58037CA6
  235.           Title: Break Every Rule
  236.       Artist(s): Tina Turner
  237.       Track   1:  4:18;15  Typical Male
  238.       Track   2:  4:31;40  What You Get Is What You See
  239.       Track   3:  4:11;45  Two People
  240.       Track   4:  4:11;15  Till The Right Man Comes Along
  241.       Track   5:  4:30;55  Afterglow
  242.       Track   6:  4:56;10  Girls
  243.       Track   7:  4:27;45  Back Where You Started
  244.       Track   8:  4:02;10  Break Every Rule
  245.       Track   9:  4:40;02  Overnight Sensation
  246.       Track  10:  5:35;68  Paradise Is Here
  247.       Track  11:  5:21;25  I'll Be Thunder
  248.       CD length: 50:46;68
  249.  
  250.  
  251.    To get an extra output of track information stored on CD, you can
  252.    add some format types:
  253.  
  254.       ShowTOC DEVICE=2060scsi.device UNIT=2 CDIDDIR=AUDIO:disks FMT="%2n: %d [%c chan/%-5y/Copy? %P/%9b]  %t"
  255.  
  256.    This would print out:
  257.  
  258.              CD: ID05007EB5035435
  259.           Title: Maxi She's The One
  260.       Artist(s): Robbie Williams
  261.        1:  4:21;02 [2 chan/Audio/Copy? n/ 46045104]  She's The One
  262.        2:  2:51;35 [2 chan/Audio/Copy? n/ 30246720]  It's Only Us
  263.        3:  4:41;38 [2 chan/Audio/Copy? n/ 49657776]  Millennium
  264.        4:  6:57;42 [2 chan/Audio/Copy? n/ 73657584]  Coke & Tears
  265.        5: 29:37;23 [2 chan/Data /Copy? n/313516896]  «Videos»
  266.       CD length: 48:28;65
  267.  
  268.    You get some extra columns in brackets:  First one is the number of
  269.    channels (%c), second is the track type (%y), third answers the
  270.    question if the track is permitted to be copied (%P) and the fourth
  271.    is the length of the track in bytes (%b).  The example CD has an
  272.    extra data track with four QuickTime movies :)
  273.  
  274.    If you are only interested in the ID of the CD, the number of
  275.    frames and the analogue runtime stored on your AudioCD, you simply
  276.    need following shell command:
  277.  
  278.       ShowTOC DEVICE=2060scsi.device UNIT=2 NOHEADER NOLIST TAILFORMAT="%i: %fa frames = %f mins"
  279.  
  280.    that returns
  281.  
  282.       ID11009B58037CA6: 228518 frames = 50:46;68 mins
  283.  
  284.    It makes no difference if you use TAILFORMAT and NOHEADER or
  285.    HEADFORMAT and NOTAIL, because both will print the same result.
  286.  
  287.  
  288.    Final note:  Using NOHEADER, NOLIST and NOTAIL together is silly,
  289.    because you got no output, but this combination can be used to
  290.    check whether a CD is inserted in your CDROM drive (you will get a
  291.    error message otherwise).
  292.  
  293.  
  294.  
  295. BUGS
  296.  
  297.    *kough* What's that?
  298.  
  299.  
  300.  
  301. DISCLAIMER
  302.  
  303.    THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS"
  304.    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  305.    TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
  306.    PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR
  307.    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  308.    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  309.    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  310.    USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  311.    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  312.    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  313.    OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  314.    SUCH DAMAGE.
  315.  
  316.  
  317.  
  318. MISC
  319.  
  320.    Suggestions and bug reports are welcome, but I think the little
  321.    program's purpose is fully accomplished.
  322.  
  323.  
  324.  
  325. OTHER TOOLS
  326.  
  327.    picsize        Shows picture dimensions using datatypes
  328.                   (Aminet: util/dtype/picsize.lha, v1.2)
  329.  
  330.    NewWinBox      Changes window dimension and position
  331.                   (Aminet: util/cli/NewWinBox.lha, v1.0)
  332.  
  333.    MCD_DirList    Generates file lists for MakeCD
  334.                   (Aminet: disk/cdrom/MCD_DirList.lha, v1.0)
  335.  
  336.  
  337.  
  338. CONTACT
  339.  
  340.    snail  Ralph Reuchlein
  341.    mail:  Eibseestr. 18c
  342.           86163 Augsburg
  343.           GERMANY
  344.    
  345.    eMail: amiga@rripley.de
  346.    WWW:   http://www.rripley.de
  347.    IRC:   RRipley on #germany
  348.  
  349.